package com.qiwx.pigeon.data.db;

import org.litepal.LitePal;
import org.litepal.annotation.Column;
import org.litepal.crud.LitePalSupport;

import java.util.ArrayList;
import java.util.List;

/**
 * @description
 * @Author qiwx
 * @Date 2020-03-24 13:41
 * 鸽子仓库表
 **/
public class WareHouseModel extends LitePalSupport {
    @Column(unique = true)
    private int id;
    @Column(unique = true)
    private int number;//仓库编号
    private String name;//仓库名
    private int useStatus;//使用状态 1为在用 0为没有使用
    private List<CageModel> cages = new ArrayList<>();//鸽笼

    public void setId(int id) {
        this.id = id;
    }

    public List<CageModel> getCages() {
        return LitePal.where("wh_id=?", String.valueOf(id)).find(CageModel.class);
    }

    public void setCages(List<CageModel> cages) {
        this.cages = cages;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }


    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getUseStatus() {
        return useStatus;
    }

    public void setUseStatus(int useStatus) {
        this.useStatus = useStatus;
    }


}
